<template>
  <el-breadcrumb separator="/">
    <!-- <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item> -->
    <el-breadcrumb-item v-for="(item,index) in route.matched" :key="index" :to="item.path">{{item.meta.title}}</el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script setup lang="ts">
import { ref, watch } from 'vue';
import { useRoute } from 'vue-router'; 
const route = useRoute()
console.log(route)
// 装路由数据的数组
 const menus = ref([])
 watch(()=>route.matched,
 (newVal: any)=>{
    menus.value = newVal
 },
 {
    immediate:true
 })

</script>

<style scoped>

</style>